package core.address.model.city;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import core.address.model.continent.Continent;
import core.address.model.country.Country;
import core.address.model.region.Region;
import core.address.model.state.State;

@Entity
@Table(name="city")
public class City implements Serializable
{

			private static final long serialVersionUID = -8767337896773261247L;
			private Long uuid;
			private String cityName ;
			private State state ;
			private Region region ;
			private Country country ;
			private Continent continent ;
			
			@Id
			@GeneratedValue
			@Column(name="uuid")
			public Long getUuid()
			{
				return uuid ;
			}
			@Column(name="cityname")
			public String getCityName() 
			{
				return cityName;
			}
			@ManyToOne(cascade = CascadeType.ALL)
		    public State getState() 
			{ 
			  return this.state; 
		    } 
			
			public void setUuid(Long uuid)
			{
				this.uuid = uuid;
			}
			public void setCityName(String cityName)
			{
				this.cityName = cityName ;
			}
			public void setState(State state)
			{
				this.state = state ;
			}
			@ManyToOne(cascade = CascadeType.ALL)
			public Region getRegion() {
				return region;
			}
			public void setRegion(Region region) {
				this.region = region;
			}
			@ManyToOne(cascade = CascadeType.ALL)
			public Country getCountry() {
				return country;
			}
			public void setCountry(Country country) {
				this.country = country;
			}
			@ManyToOne(cascade = CascadeType.ALL)
			public Continent getContinent() {
				return continent;
			}
			public void setContinent(Continent continent) {
				this.continent = continent;
			}
}
